/* How many, not necessarily distinct, values of  nCr, for 1  n  100, are greater than one-million?
 */
#include<stdio.h>

int main(void)
{
	static unsigned long long  perm[105][105];
	int i, j;
	int count = 0;
	for(i=1; i<=103; i++) {
		perm[i][1] = 1;
	}

	for(i=1; i<=103; i++) {
		perm[i][i] = 1;
	}

	for(i=3; i<=103; i++) {
		for(j=2; j<i-1; j++) {
			perm[i][j] = perm[i-1][j] + perm[i-1][j-1];
			if( perm[i][j] >= 1000000llu )
				count++; 
		}
	}

	for(i=1; i<=103; i++) {
		for(j=1; j<i-1; j++) {
			printf("%llu ", perm[i][j]);
		}
		putchar('\n');
	}
	
	

	printf("%d\n", count);
	printf("%d\n", perm[23][10]);

	return 0;
}
